package com.weiqk.pmdemo.dao;

import com.weiqk.pmdemo.pojo.ApplyLink;
import com.weiqk.pmdemo.pojo.Dic;
import com.weiqk.pmdemo.pojo.Purchase;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ApplyLinkRepository extends PagingAndSortingRepository<ApplyLink, Integer> {
//    未完成申请环节：pm_apply_link 中 complete_flag=0的相关记录
    @Query(value = "select * FROM pm_apply_link where COMPLETE_FLAG=0",nativeQuery = true)
    List<ApplyLink> findfalgnull();
    @Query(value = "select * FROM PM_APPLY_LINK where PROJECT_ID=:n",nativeQuery = true)
    List<ApplyLink> findOneById(@Param("n") int id);
}
